function LEs = Wolf(f, J, x0, dt, t_total, renormStep)
    % 经典 Wolf 方法：Gram–Schmidt 正交化计算全谱 LEs
    n      = numel(x0);
    steps  = round(t_total/dt);
    x      = x0;
    Q      = eye(n);
    Lsum   = zeros(1,n);
    count  = 0;

    for i = 1:steps
        % —— 同步积分状态 —— 
        x = RK4(f, x, dt);
        % —— 变分方程 Euler 更新 Q —— 
        Q = Q + dt * (J(x) * Q);

        % —— 定期正交化 —— 
        if mod(i, renormStep) == 0
            count = count + 1;
            R = zeros(1,n);
            for j = 1:n
                v = Q(:,j);
                for m = 1:j-1
                    v = v - (Q(:,m)'*v)*Q(:,m);
                end
                R(j)     = norm(v);
                Q(:,j)   = v / R(j);
            end
            Lsum = Lsum + log(R);
        end
    end

    % 按总时间归一化，得到每单位时间的 Lyapunov 指数
    LEs = Lsum / (count * renormStep * dt);
end
